export default defineAppConfig({
  pages: [
    'pages/index/index',
    'pages/profile/index',
    'pages/category/index',
    'pages/ai-inquiry/index',
    'pages/cart/index'
  ],
  subPackages: [
    {
      root: 'pages/order',
      name: 'order',
      pages: [
        'order-detail/index',
        'order-list/index'
      ]
    },
    {
      root: 'pages/product',
      name: 'product',
      pages: [
        'product-detail/index'
      ]
    }
  ],
  preloadRule: {
    'pages/index/index': {
      network: 'all',
      packages: ['product']
    }
  },
  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTitleText: '白喜事',
    navigationBarTextStyle: 'black'
  },
  tabBar: {
    color: '#999',
    selectedColor: '#ff6b00',
    backgroundColor: '#fff',
    borderStyle: 'black',
    list: [
      {
        pagePath: 'pages/index/index',
        text: '首页',
        iconPath: 'assets/images/tabbar/home.png',
        selectedIconPath: 'assets/images/tabbar/home-active.png'
      },
      {
        pagePath: 'pages/category/index',
        text: '分类',
        iconPath: 'assets/images/tabbar/category.png',
        selectedIconPath: 'assets/images/tabbar/category-active.png'
      },
      {
        pagePath: 'pages/ai-inquiry/index',
        text: 'AI询价',
        iconPath: 'assets/images/tabbar/ai-inquiry.png',
        selectedIconPath: 'assets/images/tabbar/ai-inquiry-active.png'
      },
      {
        pagePath: 'pages/cart/index',
        text: '购物车',
        iconPath: 'assets/images/tabbar/cart.png',
        selectedIconPath: 'assets/images/tabbar/cart-active.png'
      },
      {
        pagePath: 'pages/profile/index',
        text: '我的',
        iconPath: 'assets/images/tabbar/profile.png',
        selectedIconPath: 'assets/images/tabbar/profile-active.png'
      }
    ]
  }
})
